{% extends "blogs/base.html" %}
{% load bootstrap3 %}

{% block header %}
	<h2>
		<a href="{% url 'blogs:topics' %}">所有版块</a> - 
		<a href="{% url 'blogs:topic' topic.id %}">{{topic}}</a>
	</h2>
	<style>
	.divinline {
	display: inline-block;
	}
	</style>
{% endblock header %}

{% block content %}
	<div class="panel panel-default">
		<div class="panel-heading">
			<a href="{% url 'users:homePage' topic.Owner.id %}">版主：{{ topic.Owner }}</a>
		</div>
		<div class="panel-body">
			{% for blog in blogs %}
				<ul class="nav nav-pills nav-stacked">
					<li>
						<a href="{% url 'blogs:blog' blog.id %}" class="col-lg-5  pull-left">							
							{{ blog.title }} 
						</a>
						<a href="{% url 'users:homePage' blog.Owner.id %}" class="col-lg-5  pull-right">
							作者：{{ blog.Owner }}
						</a>
					</li>
				</ul>
			{% empty %}
				<li>还没有blog哦</li>
			{% endfor %}
			<br>
			<ul class="nav nav-pills nav-stacked">
				<li>
					<a href="{% url 'blogs:new_blog' topic.id %}" class="btn btn-primary btn-block">
						<span class="glyphicon glyphicon-edit">
							新建一个Blog
						</span>
					</a>
				</li>
			</ul>
		</div>
	</div>
{% endblock content %}
